﻿using Avalonia.BiliBili.Libs.Models;
using Bilibili.Model.Follow;
using ReactiveUI;
using System.Collections.ObjectModel;

namespace Avalonia.BiliBili.ViewModels
{
    public sealed class BangmiViewModel : ViewModelBase
    {
        public ListArray<int, bool, int> ListArray { get; }
        private ObservableCollection<FollowSeasonInfo> watching = [];
        public ObservableCollection<FollowSeasonInfo> Watching
        {
            get => watching;
            private set => this.RaiseAndSetIfChanged(ref watching, value);
        }
        private ObservableCollection<FollowSeasonInfo> planing = [];
        public ObservableCollection<FollowSeasonInfo> Planing
        {
            get => planing;
            private set => this.RaiseAndSetIfChanged(ref planing, value);
        }
        private ObservableCollection<FollowSeasonInfo> watch = [];
        public ObservableCollection<FollowSeasonInfo> Watch
        {
            get => watch;
            private set => this.RaiseAndSetIfChanged(ref watch, value);
        }
        public BangmiViewModel()
        {
            ListArray = new ListArray<int, bool, int>();
            ListArray.Add(1, false, 1);
            ListArray.Add(2, false, 1);
            ListArray.Add(3, false, 1);
        }
        public override void Dispose()
        {
            base.Dispose();
            watch?.Clear();
            planing?.Clear();
            watching?.Clear();
        }
    }
}